<!--
  @author nowind
  @since 17/07/23 14:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑采购申请列表</title>

</head>
<body>
<style type="text/css">
    .layui-form-select dl {
        max-height: 200px;
    }

    .layui-anim-upbit dl {
        max-height: 200px;
    }
</style>
<div class="layui-fluid">

    <form method="post" action="" class="layui-form" lay-filter="zmn-purchase-apply-form">
        <div class="layui-card" style="padding-right: 20px">
            <input type="text" name="categId" id="categId" maxlength="32" class="layui-input layui-hide"/>
            <input type="text" name="parentId" id="parentId" class="layui-input layui-hide"/>
            <div class="layui-split">&nbsp;</div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label layui-form-required">分类名称</label>
                        <div class="layui-input-block" style="max-width: 300px">
                            <input type="text" name="name" placeholder="配件一级分类名称" lay-verify="required"
                                   autocomplete="off" class="layui-input" maxlength="32"/>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block" style="max-width: 300px">
                            <input type="text" name="sort" placeholder="序号越小越靠前,不填默认为0" lay-verify="sort"
                                   autocomplete="off" class="layui-input" maxlength="6"/>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label layui-form-required">产品分类</label>
                        <div class="layui-input-block" style="max-width: 300px">
                            <select name="productType" lay-verify="required">
                                <option value=""></option>
                                <option value="1">家电</option>
                                <option value="2">非家电</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-form-item layui-form-item-sm">

                        <label class="layui-form-label layui-form-required">状态</label>
                        <div class="layui-input-block" style="max-width: 300px">
                            <input type="radio" name="status" lay-verify="required"
                                   th:each="status:${statuses}"
                                   th:value="${status.key}"
                                   th:checked="${status.key == partCategory.status}"
                                   th:title="${status.value}">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-split">&nbsp;</div>

        </div>
        <div class="layui-layout-admin">
            <div class="layui-footer" style="left: 0;">
                <button type="submit" class="layui-btn" lay-submit
                        lay-filter="zmn-part-category-form-submit">保存
                </button>
                <button type="button" id="cancel" class="layui-btn  layui-btn-primary">
                    取消
                </button>
            </div>
        </div>
    </form>


</div>
<script type="text/javascript" th:inline="javascript">
    var json = {
        items: [[${partCategory}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        part_part_category_first_detail: "{/}/static/js/module/part/category/first/zmn.plat.part.category.first.detail"
    }).use(['index','part_part_category_first_detail']);


</script>
</body>
</html>